/**
 * Created by heshufen on 20/6/21.
 */

import React, {Component} from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';

const Stack = createStackNavigator();


export default class AppContainer extends Component {
    render() {
        const {routes} = require('./routes');
        return (
            <NavigationContainer>
                <Stack.Navigator initialRouteName="First" headerMode="none">
                    {routes.map((item, index) => {
                        return <Stack.Screen key={index} name={item.name} component={item.screen}/>;
                    })}
                </Stack.Navigator>
            </NavigationContainer>
        );
    }
}

